package com.meme.editor.gui.sprite2d;

import java.awt.BorderLayout;
import java.awt.Dimension;

import javax.swing.JPanel;

import javax.swing.JScrollPane;
import javax.swing.ScrollPaneConstants;
import javax.swing.JSplitPane;

import com.meme.editor.model.sprite2d.Sprite2dFile;
import com.meme.editor.gui.PropertyEditPanel;

public class Sprite2dTreePanel extends JPanel 
{
	public Sprite2dTreePanel (Sprite2dFile sprite2dFile)
	{
		PropertyEditPanel treenodePropertyPanel = new PropertyEditPanel ();
		Sprite2dTreeView  mTreeView = new Sprite2dTreeView (sprite2dFile, treenodePropertyPanel);


		JSplitPane splitPane = new JSplitPane (JSplitPane.VERTICAL_SPLIT, 
                                               new JScrollPane (mTreeView), 
                                               treenodePropertyPanel );

		//splitPane.setPreferredSize ( new Dimension (680, 500) );
		splitPane.setDividerLocation (500 - 200);
		splitPane.setDividerSize  (2);
		splitPane.setResizeWeight (1.0);

		setLayout ( new BorderLayout() );
		add (splitPane, BorderLayout.CENTER);
	}
}
